/* eslint-disable no-empty */
import Vue from 'vue';
import App from './App.vue';
import demo01 from './pages/demo01';
import demo02 from './pages/demo02';
import index from './pages/index';
import cfhw from './pages/dhl/cfhw';
import phb from './pages/dhl/phb';
import cpfl from './pages/dhl/cpfl';
import cfwd from './pages/dhl/cfwd';
import xgcd from './pages/dhl/xgcd';
import shiji from './pages/shiji/shiji';
import shoucang from './pages/shoucang/shoucang';
import wo from './pages/wo/wo';
import xj from './pages/xj/xj';
import Vant from 'vant';
import 'vant/lib/index.css';
import VueRouter from 'vue-router';
import more from './pages/more';
import axios from 'axios';
import VueAxios from 'vue-axios';
import VueAwesomeSwiper from 'vue-awesome-swiper';
import 'swiper/dist/css/swiper.css';
Vue.use(VueAwesomeSwiper);
Vue.use(VueAxios, axios);
Vue.use(Vant);
Vue.config.productionTip = false;
// 定义路由
const routes = [{
    path: '/demo01',
    name: 'demo01',
    component: demo01
}, {
    path: '/demo02',
    name: 'demo02',
    component: demo02
}, {
    path: '/',
    name: 'index',
    component: index
}, {
    path: '/more',
    name: 'more',
    component: more
}, {
    path: '/cfhw',
    name: 'cfhw',
    component: cfhw
}, {
    path: '/cfwd',
    name: 'cfwd',
    component: cfwd
}, {
    path: '/cpfl',
    name: 'cpfl',
    component: cpfl
}, {
    path: '/phb',
    name: 'phb',
    component: phb
}, {
    path: '/xgcd',
    name: 'xgcd',
    component: xgcd
}, {
    path: '/shiji',
    name: 'shiji',
    component: shiji
}, {
    path: '/shoucang',
    name: 'shoucang',
    component: shoucang
}, {
    path: '/xj',
    name: 'xj',
    component: xj
}, {
    path: '/wo',
    name: 'wo',
    component: wo
}];

// 注册vuerouter组件
Vue.use(VueRouter);

// 3. 创建 router 实例，然后传 `routes` 配置
// 你还可以传别的配置参数, 不过先这么简单着吧。
const router = new VueRouter({
    routes // (缩写) 相当于 routes: routes
});
new Vue({
    mode: 'hash',
    router,
    render: h => h(App)
}).$mount('#app');
// var http = require('http');
// var fs = require('fs');
// http.createServer(function (req, res) {
//     var url = req.url;
//     if (url.index.of('/static/') === 0) {
//         fs.readFile('.' + url, function (err, data) {
//             if (err) {
//                 return res.end('404 Not found');
//             }
//             res.end(data);
//         });
//     };
// });
